window: Don't set min_size > size
authorMatthias Clasen <mclasen@redhat.com>
Fri, 7 Aug 2020 17:55:02 +0000 (13:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 7 Aug 2020 17:55:02 +0000 (13:55 -0400)
This fixes the failing reftest.

gtk/gtkwindow.c

index b228b7630bd4e6a329902a90ba476173bff37e45..d84729442fbb19a61cf982c72a01cdb3f186772b 100644 (file)
@@ -4348,8 +4348,8 @@ toplevel_compute_size (GdkToplevel     *toplevel,
 
   get_shadow_width (window, &shadow);
 
-  min_width = default_width + shadow.left + shadow.right;
-  min_height = default_height + shadow.top + shadow.bottom;
+  min_width = MIN (default_width + shadow.left + shadow.right, width);
+  min_height = MIN (default_height + shadow.top + shadow.bottom, height);
   gdk_toplevel_size_set_min_size (size, min_width, min_height);
 }